package day05;

import java.util.Arrays;
import java.util.Random;
public class Test {
    public static void main(String[] args) {
        Random rand = new Random();
        int[] arr5;
        arr5 = new int[10];
        for(int i=0; i<arr5.length; i++){
            arr5[i] = rand.nextInt(100);
            System.out.println(arr5[i]);
        }
        int max = arr5[0];
        for(int j=0; j<arr5.length; j++){
            if(arr5[j]>max){
                max = arr5[j];
            }
        }
        System.out.println("新数组的最大值: "+max);
        System.out.println("新数组的排序:");
        Arrays.sort(arr5);
        for(int j=0; j<arr5.length; j++){
            System.out.println(arr5[j]);
        }
        System.out.println("新数组的倒序:");
        for(int j=arr5.length-1; j>=0 ; j--){
            System.out.print(arr5[j]);
        }
    }
}
